<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

    <head>
        <link href="application/style.css" media="screen" rel="stylesheet" type="text/css" />        
        <script type="text/javascript" src="application/jquery.min.js"></script>

        <script type="text/javascript">
            $(document).ready(function() {
          
                $(".problems").click(function(){
                    $(this).parent().siblings('.project-errors').slideToggle();
                });
                
                $("a.synchro").click(function(){
                    $(this).siblings('.loader').slideToggle();
                });
                
                
            });
        </script>

    </head>
    <body>       
        <div id="cover">
            <h1><a href="http://www.translatekarate.com">TranslateKarate</a> gettext tool</h1>                        

            <?php echo $this->renderErrors() ?>
            <?php echo $this->renderMessages() ?>

            <?php foreach ($this->projects as $key => $project): ?>
                <div class="project">
                    <div class="project-name">                        
                        <?php if (!$project->isValid()): ?>
                            <img class="problems" src="application/warning_16.png" />
                        <?php endif ?>                        

                        &nbsp;&nbsp;<?php echo $project->name ?>                         
                    </div>
                    <div class="synchro-cover">
                        <img src="application/ajax-loader.gif" class="loader" />
                        <?php if ($project->isValid()): ?>
                            <a class="synchro" href="?action=synchronize&project=<?php echo $key ?>">synchronize</a>
                        <?php else: ?>
                            <div class="synchro">synchronize</div>
                        <?php endif ?>
                        <div style="clear:left"></div>
                    </div>
                    <div style="clear:left"></div>

                    <?php if (!$project->isValid()): ?>
                        <ul class="project-errors">
                            <?php echo '<li />' . implode("<li />", $project->errors) ?>
                        </ul>
                    <?php endif ?>
                </div>
            <?php endforeach ?>            


            <div style="display:none">f
                <br /><br />
                <h2>Available locales on this machine:</h2>

                <div style="width: 600px">
                    <?php foreach ($this->locales as $locale): ?>
                        <div style="float:left; width: 120px">
                            <?php echo $locale ?>
                        </div>                
                    <?php endforeach ?>
                    <div style="clear:left"></div>
                </div>
                <br /><br />
                If you need some other locale, run following command "sudo locale-gen cs_CZ.utf8", change cs_CZ.utf8 for locale you need) 

            </div>
            <br /><br />
            <hr />
            <div style="font-size: 10px; width: 100%; text-align: right">
                created by: <a href="http://www.translatekarate.com">TranslateKarate.com - i18n online tool</a>                
            </div>
        </div>
    </body>
</html>